#! /bin/sh

# ] ---- AUTOSTART ---- [

# Start polkit thinggy
lxpolkit &

# Keyboard settings and shortcut daemon
numlockx &
xset r rate 240 40 &
setxkbmap -layout us &

# Startup applications
pgrep -x sxhkd > /dev/null || sxhkd &
pgrep -x xbindkeys || xbindkeys &
killall deadd-notification-center && deadd-notification-center &
pgrep -x conky ||  /home/az/.conky/conky-startup.sh &
#pgrep -x tint2 || tint2 &
nitrogen --restore &
mount -t davfs https://lilsnoot.hopto.org/remote.php/dav/files/azhar/ &
pgrep bspswallow || bspswallow &
#sleep 5 && /home/az/scripts/start-sfx.sh &
pgrep -x polybar || /home/az/.config/polybar/shapes/launch.sh && polybar -r empty &
pgrep -x polybar || polybar -r empty &
#pgrep -x polybar || polybar -r first &
pgrep -x picom || picom -b &
#killall plank && plank &
killall glava ; sleep 2 && glava -d -a pulseaudio --force-mod=graph &
openrgb --config /home/az/.config/OpenRGB/ -p space-3.orp &

#~/.fehbg
#flameshot &
#nm-applet &
#killall glava; sleep 1 && glava -d -a pulseaudio --force-mod=radial &
# LAYOUT

#bspc config top_padding 	-24
#bspc config -m DVI-D-0 top_padding 22
bspc config -m DVI-D-0 top_padding 4
bspc config -m DP-0 top_padding 16
bspc config bottom_padding 	0

# ] ---- WORKSPACES ---- [ 

bspc monitor DP-0 -d I II III IV V
bspc monitor DVI-D-0 -d VI VII VIII IX X

# ] ---- WINDOW CONFIG ---- [

bspc config margin top          20

bspc config border_width         1
bspc config window_gap         	18

bspc config normal_border_color "#8935ff"
bspc config focused_border_color "#00ff9c"

bspc config split_ratio          0.50
bspc config borderless_monocle   false
bspc config gapless_monocle      true

bspc rule -a Gimp desktop='^8' state=floating follow=on
bspc rule -a Chromium desktop='^2'
bspc rule -a mplayer2 state=floating
bspc rule -a openrgb state=floating
bspc rule -a TeamViewer state=floating
bspc rule -a pulseaudio-equalizer state=floating
bspc rule -a kitty state=pseudo_tiled
bspc rule -a battle.net.exe state=pseudo_tiled
bspc rule -a qBittorrent state=pseudo_tiled
bspc rule -a Kupfer.py focus=on
bspc rule -a Screenkey manage=off
bspc rule -a tint2 state=floating
bspc rule -a glava state=floating
bspc rule -a polybar state=manage=off


